package com.sun.controller;

import com.sun.dao.vo.Result;
import com.sun.dao.vo.params.LoginParam;
import com.sun.service.LoginService;
import com.sun.service.impl.LoginServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("logout")
public class LogOutController {
    @Autowired
    private LoginService loginService;

    @GetMapping()
    public Result logout(@RequestHeader("Authorization") String token){
        System.out.println("111111"+token);
        token = LoginServiceImpl.token;
        System.out.println("22222222"+token);
        return loginService.logout(token);
    }
}
